<!DOCTYPE HTML>
<html>
  <head>
	<?php echo Yaf_View_Simple::render("header.phtml"); ?>
  </head>
  <body>
	<?php echo Yaf_View_Simple::render("menu.phtml"); ?>
    <?php //var_dump($role); ?>
	<div class="create">
	  <div class="content">
		<form role="form" class="form-horizontal" id="beform" action="insert">
		  <fieldset>
			<div class="form-group">
			  <label class="col-lg-2 control-label" for="role_name">Roles:</label>
			  <div class="controls col-lg-4">
				<input type="text" name="role_name" class="form-control" id="role_name" />
			  </div>
			</div>
			<div class="form-group">
			  <label class="col-lg-2 control-label" for="role_description">Description:</label>
			  <div class="col-lg-4">
				<input type="text" name="role_description" class="form-control" id="role_description" />
			  </div>
            </div>
			<div class="form-group">
			  <label class="col-lg-2 control-label" for="role_description">Rules:</label>
			  <div class="col-lg-4">
                <table class="table table-bordered">
                  <tbody>
                    <?php foreach($rules as $r){ ?>
                    <tr>
                      <td>
                        <input type="checkbox" name="rule_id[]" value="<?php echo $r['rule_id']; ?>" />
                      </td>
                      <td>
                        <?php echo $r['rule_name']; ?>
                      </td>
                    </tr>
                    <?php } ?>
                  </tbody>
                </table>
			  </div>
            </div>              
	        <div class="form-group">
		      <label class="col-lg-2 control-label"></label>
		      <div class="col-lg-6">
		        <a  href="javascript:def.submit('#beform',null)" class="btn btn-primary">Submit</a>
              </div>              
            </div>
		  </fieldset>
          
		</form>
	  </div>
	</div>
	
	<!-- 模态框（Modal） -->
	<div class="modal fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="modellabel" aria-hidden="true">
	  <div class="modal-dialog">
		<div class="modal-content">
		  <div class="modal-header bg-default">
			<div class="modal-title" id="modallabel">
			  <h5 class="text-primary">Signal</h5>
			</div>
		  </div>
		  <div class="modal-body bg-primary">
			
		  </div>
		  <div class="modal-footer">
			<button type="button" class="btn btn-default" data-dismiss="modal">Close
			</button>
		  </div>
		</div><!-- /.modal-content -->
	  </div><!-- /.modal -->
	</div>		

	<?php echo Yaf_View_Simple::render("footer.phtml"); ?>
  </body>
</html>
